package com.wuqing.dubbo03.service;

import com.wuqing.TpRunService;
import com.wuqing.dubbo03.utils.RandomUtils;
import org.apache.dubbo.config.annotation.Service;

/**
 * @author wuqing
 * @date 2020/8/8
 */
@Service(version = "${demo.service.version}", registry = "${dubbo.registry.id}",
        interfaceClass = TpRunService.class)
public class TpRunServiceImpl implements TpRunService {

    @Override
    public String sayHello1(String name) {

        //RandomUtils.randomSleep(100);
        RandomUtils.sleep20();

        return "Dubbo03 打招呼 ~~~" + name;
    }

    @Override
    public String study1(String name) {

        RandomUtils.sleep20();
        //RandomUtils.randomSleep(100);

        return "Dubbo03 好好学习 ~~~" + name;
    }

    @Override
    public String run1(String name) {

        RandomUtils.randomSleep(100);
        return "Dubbo03 好好跑步 ~~~" + name;

    }

}